using System;
using NUnit.Framework;
using dnAnalytics.Math;
using dnAnalytics.UnitTests;
namespace dnAnalytics.UnitTests.Math
{
	[TestFixture]
	[Category("Managed")]
	public class ComplexMath_SinhTest
	{
		[Test]
		public void Sinh()
		{
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,1.19209289550780998537e-7)), new Complex(0.0,1.19209289550780716193e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,-1.19209289550780998537e-7)), new Complex(0.0,-1.19209289550780716193e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,5.0e-1)), new Complex(0.0,4.79425538604203000273e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,-5.0e-1)), new Complex(0.0,-4.79425538604203000273e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,1.0)), new Complex(0.0,8.41470984807896506653e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,-1.0)), new Complex(0.0,-8.41470984807896506653e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,2.0)), new Complex(0.0,9.09297426825681695396e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,-2.0)), new Complex(0.0,-9.09297426825681695396e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,8.388608e6)), new Complex(0.0,4.32248202256797756659e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(0.0,-8.388608e6)), new Complex(0.0,-4.32248202256797756659e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,0.0)), new Complex(1.19209289550781280881e-7,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,0.0)), new Complex(-1.19209289550781280881e-7,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,1.19209289550780998537e-7)), new Complex(1.19209289550780433848e-7,1.19209289550781563226e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,-1.19209289550780998537e-7)), new Complex(1.19209289550780433848e-7,-1.19209289550781563226e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,1.19209289550780998537e-7)), new Complex(-1.19209289550780433848e-7,1.19209289550781563226e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,-1.19209289550780998537e-7)), new Complex(-1.19209289550780433848e-7,-1.19209289550781563226e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,5.0e-1)), new Complex(1.0461599372510587495e-7,4.79425538604206406797e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,-5.0e-1)), new Complex(1.0461599372510587495e-7,-4.79425538604206406797e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,5.0e-1)), new Complex(-1.0461599372510587495e-7,4.79425538604206406797e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,-5.0e-1)), new Complex(-1.0461599372510587495e-7,-4.79425538604206406797e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,1.0)), new Complex(6.44090540251898595533e-8,8.41470984807902485663e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,-1.0)), new Complex(6.44090540251898595533e-8,-8.41470984807902485663e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,1.0)), new Complex(-6.44090540251898595533e-8,8.41470984807902485663e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,-1.0)), new Complex(-6.44090540251898595533e-8,-8.41470984807902485663e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,2.0)), new Complex(-4.96085687335899466039e-8,9.09297426825688156343e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,-2.0)), new Complex(-4.96085687335899466039e-8,-9.09297426825688156343e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,2.0)), new Complex(4.96085687335899466039e-8,9.09297426825688156343e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,-2.0)), new Complex(4.96085687335899466039e-8,-9.09297426825688156343e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,8.388608e6)), new Complex(-1.0749753400787825059e-7,4.32248202256800827967e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.19209289550780998537e-7,-8.388608e6)), new Complex(-1.0749753400787825059e-7,-4.32248202256800827967e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,8.388608e6)), new Complex(1.0749753400787825059e-7,4.32248202256800827967e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.19209289550780998537e-7,-8.388608e6)), new Complex(1.0749753400787825059e-7,-4.32248202256800827967e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,0.0)), new Complex(5.21095305493747361622e-1,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,0.0)), new Complex(-5.21095305493747361622e-1,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,1.19209289550780998537e-7)), new Complex(5.21095305493743659018e-1,1.34423490191266028384e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,-1.19209289550780998537e-7)), new Complex(5.21095305493743659018e-1,-1.34423490191266028384e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,1.19209289550780998537e-7)), new Complex(-5.21095305493743659018e-1,1.34423490191266028384e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,-1.19209289550780998537e-7)), new Complex(-5.21095305493743659018e-1,-1.34423490191266028384e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,5.0e-1)), new Complex(4.57304153184249221608e-1,5.40612685713153380354e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,-5.0e-1)), new Complex(4.57304153184249221608e-1,-5.40612685713153380354e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,5.0e-1)), new Complex(-4.57304153184249221608e-1,5.40612685713153380354e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,-5.0e-1)), new Complex(-4.57304153184249221608e-1,-5.40612685713153380354e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,1.0)), new Complex(2.81548995135334393823e-1,9.48864531437168080524e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,-1.0)), new Complex(2.81548995135334393823e-1,-9.48864531437168080524e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,1.0)), new Complex(-2.81548995135334393823e-1,9.48864531437168080524e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,-1.0)), new Complex(-2.81548995135334393823e-1,-9.48864531437168080524e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,2.0)), new Complex(-2.16852162920789711624e-1,1.02534738858398772551), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,-2.0)), new Complex(-2.16852162920789711624e-1,-1.02534738858398772551), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,2.0)), new Complex(2.16852162920789711624e-1,1.02534738858398772551), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,-2.0)), new Complex(2.16852162920789711624e-1,-1.02534738858398772551), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,8.388608e6)), new Complex(-4.69900127202735176486e-1,4.87414296278544471557e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(5.0e-1,-8.388608e6)), new Complex(-4.69900127202735176486e-1,-4.87414296278544471557e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,8.388608e6)), new Complex(4.69900127202735176486e-1,4.87414296278544471557e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-5.0e-1,-8.388608e6)), new Complex(4.69900127202735176486e-1,-4.87414296278544471557e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,0.0)), new Complex(1.17520119364380145688,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,0.0)), new Complex(-1.17520119364380145688,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,1.19209289550780998537e-7)), new Complex(1.17520119364379310658,1.83949546195892914381e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,-1.19209289550780998537e-7)), new Complex(1.17520119364379310658,-1.83949546195892914381e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,1.19209289550780998537e-7)), new Complex(-1.17520119364379310658,1.83949546195892914381e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,-1.19209289550780998537e-7)), new Complex(-1.17520119364379310658,-1.83949546195892914381e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,5.0e-1)), new Complex(1.03133607425455128307,7.39792264456013728317e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,-5.0e-1)), new Complex(1.03133607425455128307,-7.39792264456013728317e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,5.0e-1)), new Complex(-1.03133607425455128307,7.39792264456013728317e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,-5.0e-1)), new Complex(-1.03133607425455128307,-7.39792264456013728317e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,1.0)), new Complex(6.34963914784736108255e-1,1.29845758141597729483), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,-1.0)), new Complex(6.34963914784736108255e-1,-1.29845758141597729483), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,1.0)), new Complex(-6.34963914784736108255e-1,1.29845758141597729483), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,-1.0)), new Complex(-6.34963914784736108255e-1,-1.29845758141597729483), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,2.0)), new Complex(-4.89056259041293673586e-1,1.40311925062204058802), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,-2.0)), new Complex(-4.89056259041293673586e-1,-1.40311925062204058802), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,2.0)), new Complex(4.89056259041293673586e-1,1.40311925062204058802), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,-2.0)), new Complex(4.89056259041293673586e-1,-1.40311925062204058802), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,8.388608e6)), new Complex(-1.05974316897517072251,6.66993830336167370804e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(1.0,-8.388608e6)), new Complex(-1.05974316897517072251,-6.66993830336167370804e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,8.388608e6)), new Complex(1.05974316897517072251,6.66993830336167370804e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-1.0,-8.388608e6)), new Complex(1.05974316897517072251,-6.66993830336167370804e-1), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,0.0)), new Complex(3.62686040784701876767,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,0.0)), new Complex(-3.62686040784701876767,0.0), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,1.19209289550780998537e-7)), new Complex(3.62686040784699299728,4.48488675485088183025e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,-1.19209289550780998537e-7)), new Complex(3.62686040784699299728,-4.48488675485088183025e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,1.19209289550780998537e-7)), new Complex(-3.62686040784699299728,4.48488675485088183025e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,-1.19209289550780998537e-7)), new Complex(-3.62686040784699299728,-4.48488675485088183025e-7), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,5.0e-1)), new Complex(3.18286944833714877865,1.80369269553218173966), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,-5.0e-1)), new Complex(3.18286944833714877865,-1.80369269553218173966), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,5.0e-1)), new Complex(-3.18286944833714877865,1.80369269553218173966), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,-5.0e-1)), new Complex(-3.18286944833714877865,-1.80369269553218173966), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,1.0)), new Complex(1.95960104142160589707,3.16577851321616814674), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,-1.0)), new Complex(1.95960104142160589707,-3.16577851321616814674), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,1.0)), new Complex(-1.95960104142160589707,3.16577851321616814674), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,-1.0)), new Complex(-1.95960104142160589707,-3.16577851321616814674), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,2.0)), new Complex(-1.50930648532361549305,3.42095486111701335354), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,-2.0)), new Complex(-1.50930648532361549305,-3.42095486111701335354), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,2.0)), new Complex(1.50930648532361549305,3.42095486111701335354), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,-2.0)), new Complex(1.50930648532361549305,-3.42095486111701335354), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,8.388608e6)), new Complex(-3.27053832384664918808,1.62620232400917054361), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(2.0,-8.388608e6)), new Complex(-3.27053832384664918808,-1.62620232400917054361), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,8.388608e6)), new Complex(3.27053832384664918808,1.62620232400917054361), 5e-014);
			TestHelper.TestRelativeError(ComplexMath.Sinh(new Complex(-2.0,-8.388608e6)), new Complex(3.27053832384664918808,-1.62620232400917054361), 5e-014);
		}
	}
}
